package cn.com.hhrcw.service.impl;

import cn.com.hhrcw.entity.CvFamilyMember;
import cn.com.hhrcw.mapper.CvFamilyMemberMapper;
import cn.com.hhrcw.service.ICvFamilyMemberService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;

/**
 * <p>
    * 简历-家庭成员 服务实现类
    * </p>
 *
 * @author zhuxx
 * @since 2021-05-25
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class CvFamilyMemberServiceImpl extends ServiceImpl<CvFamilyMemberMapper, CvFamilyMember> implements ICvFamilyMemberService {
    @Override
    public List<CvFamilyMember> getByDate(Date beginDate, Date endDate){
        LambdaQueryWrapper<CvFamilyMember> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.between(CvFamilyMember::getCreateTime,beginDate,endDate).or().between(CvFamilyMember::getUpdateTime,beginDate,endDate);
        return this.baseMapper.selectList(lambdaQueryWrapper);
    }
}
